package com.puti.doctor.controller;

import com.puti.common.core.web.controller.BaseController;
import com.puti.common.core.web.page.TableDataInfo;
import com.puti.doctor.domian.HospitalDoctorInfo;
import com.puti.doctor.domian.SystemHospitalDept;
import com.puti.doctor.domian.SystemHospitalInfo;
import com.puti.doctor.service.ISystemHospitalInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@CrossOrigin
@RestController
@RequestMapping("/info")
public class SystemHospitalInfoController extends BaseController {

    @Autowired
    private ISystemHospitalInfoService systemHospitalInfoService;

    //医生管理+医师搜索（模糊查询）
    @GetMapping("/list")
    public TableDataInfo list(SystemHospitalInfo systemHospitalInfo){
        startPage();
        List<SystemHospitalInfo> list = systemHospitalInfoService.selectSystemHospitalInfoList(systemHospitalInfo);
        return getDataTable(list);
    }

    //医生所属医院列表
    @GetMapping("/selectHospitalDoctorInfoList")
    public TableDataInfo selectHospitalDoctorInfoList(){
        startPage();
        List<HospitalDoctorInfo> hospitalDoctorInfos = systemHospitalInfoService.selectHospitalDoctorInfoList();
        return getDataTable(hospitalDoctorInfos);
    }

    //科室医生列表
    @GetMapping("/selectSystemHospitalDeptList")
    public TableDataInfo selectSystemHospitalDeptList(){
        startPage();
        List<HospitalDoctorInfo> hospitalDoctorInfos = systemHospitalInfoService.selectSystemHospitalDeptList();
        return getDataTable(hospitalDoctorInfos);
    }

    //医生审核信息列表DoctorAuditList
    @GetMapping("/doctorAuditList")
    public TableDataInfo doctorAuditList(){
        startPage();
        List<HospitalDoctorInfo> hospitalDoctorInfos = systemHospitalInfoService.doctorAuditList();
        return getDataTable(hospitalDoctorInfos);
    }
}
